function id<Type> (value: Type) {
  return value
}

const num1 = id<number>(1)
const str1 = id<string>('str')

const num2 = id(100)
const str2 = id('abc')

console.log(num1, str1, num2, str2)